def method():
    n = int(input())
    nums = [int(x) for x in input().split(' ')]
    ans = 0
    for num in nums:
        ans += num if num > 0 else (-num)
    return ans 

ans = method()
print(ans)
